package com.tao.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tao.entity.Help;
import com.tao.vo.ListDetailVo;
import com.tao.vo.ListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.lang.Nullable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
public interface ListMapper extends BaseMapper<Help> {
    //查询全部
     List<ListVo> getHelpByHelpStatus(@Param("sort") @Nullable String sort);

    //查询分类
    List<ListVo> getHelpByHelpStatusAll(@Param("categoryId")  Long categoryId,@Param("sort")@Nullable String sort);

    //有偿无偿查询
    List<ListVo> getHelpByReward( Long hasReward);

    //搜索求助
    List<ListVo> getHelpBySearch(@Param("categoryId")  Long categoryId,@Param("sort")@Nullable String sort,@Param("filter") String filter);

    //求助详情查询
    ListDetailVo getHelpByDetail(Long id);
}
